﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TImSdk
{
    public static class JsonExtension
    {
        public static string ToJsonString<T>(this T t)
        {
            return JsonConvert.SerializeObject(t);
        }

       
        public static T StringToObject<T>(this string value)
        {
            return JsonConvert.DeserializeObject<T>(value);
        }
    }
}
